package com.zimi.util;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.zimi.model.FormElement;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

/**
 * @Auther: lmc
 * @Date: 2019/3/29 10:46
 * @Description:
 */
@Slf4j
public class FormElementUtil {
    public static List<FormElement> getDbFormElements(String htmlContent) {
        List<FormElement> result = new ArrayList<FormElement>();
        List aa = new ArrayList();

        Gson gson = new Gson();
        result = gson.fromJson(htmlContent, new TypeToken<List<FormElement>>() {
        }.getType());

        return result;
    }
}
